package libnetdb.dm.assoc.dhp;
import libnetdb.dm.assoc.base.*;
import libnetdb.dm.assoc.util.*;

/**
 * <code>ScannerBuilder</code> is used to create different scanner.
 * The candidate large itemset is added to the builder one by one.
 * Then, one can obtain a scanner for these candidates by calling
 * the function <code>getScanner</code>.
 *
 * @author Cheng-Ru Lin
 * @version 1.0
 */
public interface ScannerBuilder {

    /**
     * Adds the specified candidate large itemset to the building
     * scanner for counting.
     *
     * @param candidate the candidate large itemset to be added
     */
    public void addCandidate(Litemset candidate);

    /**
     * Returns the current built scanner which can update the count
     * information of added candidates. After calling this function,
     * the builder will be reset and ready for create next scanner.
     *
     * @return a scanner which can update the count information of added
     *   candidate; or null if no scan need
     */
    public Scanner getScanner();
}